/* ================================================================
   HSE PAGE – Health, Safety & Environment
   Professional, Safety-Focused & Premium Design
================================================================ */

:root {
  --hse-accent: #d52b1e;
  --hse-accent-muted: #a52714;
  --hse-bg: #FAFAF8;
  --hse-card-bg: #FFFFFF;
  --hse-text: #1C1C1C;
  --hse-text-light: #72726F;
  --hse-border: #E8E6E0;
  --hse-radius: 16px;
  --hse-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  --hse-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --hse-bg: var(--bg);
  --hse-card-bg: var(--card-bg);
  --hse-text: var(--text);
  --hse-text-light: var(--text-light);
  --hse-border: var(--border);
}

/* ================================================================
   PAGE HERO
================================================================ */

.hse-hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
}

.hse-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(to top, #000 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.hse-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hse-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: brightness(0.85);
  animation: heroZoomOut 10s linear forwards;
}

@keyframes heroZoomOut {
  to { transform: scale(1); }
}

.hse-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 1;
}

.hse-hero-content {
  position: relative;
  z-index: 10;
  padding-bottom: 80px;
  color: #fff;
  width: 100%;
}

.hse-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  margin-bottom: 18px;
}

.hse-hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hse-hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 600px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

/* ================================================================
   HSE GRIDS & CARDS
================================================================ */

.hse-section {
    padding: 100px 0;
    background: var(--hse-bg);
}

.hse-section.alt-bg {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.intro-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.intro-video {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.intro-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.warning-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.hse-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 50px;
    width: 100%;
}

@media (max-width: 1024px) {
    .hse-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 500px) {
    .hse-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        scrollbar-width: none;
    }
    
    .hse-grid::-webkit-scrollbar {
        display: none;
    }
    
    .hse-card {
        min-width: 280px;
        scroll-snap-align: center;
    }
}

.hse-card {
    background: var(--hse-card-bg);
    padding: 35px 25px;
    border-radius: var(--hse-radius);
    border: 1px solid var(--hse-border);
    box-shadow: var(--hse-shadow);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    text-align: center; /* Center content for better alignment */
    height: 100%;
}

.hse-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hse-shadow-hover);
    border-color: var(--hse-accent);
}

@media (max-width: 768px) {
    .hse-card {
        padding: 25px 20px;
    }
}

.hse-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(213, 43, 30, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    margin-left: auto;
    margin-right: auto; /* Center icon */
    transition: all 0.3s ease;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .hse-icon-box {
        width: 50px;
        height: 50px;
        margin-bottom: 18px;
    }
    
    .hse-icon-box i {
        font-size: 20px;
    }
}

.hse-card:hover .hse-icon-box {
    background: var(--hse-accent);
}

.hse-icon-box i {
    font-size: 24px;
    color: var(--hse-accent);
    transition: all 0.3s ease;
}

.hse-card:hover .hse-icon-box i {
    color: #fff;
}

.hse-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.hse-card p {
    font-size: 0.95rem;
    color: var(--hse-text-light);
    line-height: 1.6;
}

/* Warning Box */
.hse-warning-section {
    padding: 60px 0;
    background: var(--hse-bg);
}

.hse-warning-box {
    background: var(--hse-card-bg);
    border-radius: var(--hse-radius);
    padding: 50px;
    border-left: 6px solid var(--hse-accent);
    box-shadow: var(--hse-shadow);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}

.warning-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--hse-accent);
    margin-bottom: 20px;
}

.warning-list {
    list-style: none;
    padding: 0;
}

.warning-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--hse-text);
    margin-bottom: 15px;
    font-weight: 500;
}

.warning-list li i {
    color: var(--hse-accent);
    font-size: 14px;
}

/* PPE Grid */
.ppe-card {
    text-align: center;
    padding: 35px 25px;
}

.ppe-emoji {
    font-size: 40px;
    margin-bottom: 20px;
    display: block;
}

/* Contact Table */
.contact-table-wrapper {
    background: var(--hse-card-bg);
    border-radius: var(--hse-radius);
    overflow: hidden;
    border: 1px solid var(--hse-border);
    box-shadow: var(--hse-shadow);
    margin-top: 40px;
}

.hse-table {
    width: 100%;
    border-collapse: collapse;
}

.hse-table th {
    background: var(--hse-accent);
    color: #fff;
    padding: 18px 24px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hse-table td {
    padding: 18px 24px;
    border-bottom: 1px solid var(--hse-border);
    font-size: 15px;
    color: var(--hse-text);
}

.hse-table tr:last-child td {
    border-bottom: none;
}

.hse-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .hse-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.phone-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hse-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.phone-tag:hover {
    color: var(--hse-accent-muted);
}

/* Responsive */
@media (max-width: 992px) {
    .intro-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .intro-visual {
        order: -1;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .hse-warning-box {
        grid-template-columns: 1fr;
        padding: 40px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hse-hero {
        height: 70vh;
        min-height: 480px;
    }
    
    .hse-section {
        padding: 60px 0;
    }

    .hse-warning-section {
        padding: 50px 0;
    }

    .hse-warning-box {
        padding: 30px 24px;
    }
    
    .hse-table th, .hse-table td {
        padding: 14px 16px;
        font-size: 14px;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .intro-container {
        gap: 30px;
    }

    .warning-content h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .hse-section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 25px;
    }

    .intro-container {
        gap: 24px;
    }

    .hse-warning-box {
        padding: 24px 16px;
        border-left-width: 4px;
    }

    /* Scrollable table on small screens */
    .contact-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .hse-table {
        min-width: 480px;
    }

    .warning-content h3 {
        font-size: 1.3rem;
        margin-bottom: 14px;
    }

    .warning-list li {
        font-size: 0.92rem;
    }
}

@media (max-width: 480px) {
    .hse-hero {
        height: 65vh;
        min-height: 420px;
    }

    .hse-hero-label {
        font-size: 10px;
        padding: 5px 12px;
        letter-spacing: 1.5px;
    }
}
